package org.mspring.platform.security.action.rule;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Gao Youbo
 * @since 2013年9月10日
 */
public interface SecurityRule {
    /**
     * 判断是否通过权限验证
     *
     * @param request
     * @param response
     * @return 通过:true, 不通过:false
     */
    public boolean shouldProceed(HttpServletRequest request, HttpServletResponse response);

    /**
     * 验证失败后的错误处理方法
     *
     * @param request
     * @param response
     */
    public void handleError(HttpServletRequest request, HttpServletResponse response) throws Exception;
}